package Demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-16
 * Time: 20:05
 */
public class Dog {
    //狗的属性
    public String name;
    public int age;
    public String gender;

    //狗的行为
    public void eat(){
        System.out.println(name + " 正在吃饭!");
    }

    public void sleep(){
        System.out.println(name + " 正在睡觉!");
    }

    //狗所独有的行为
    public void wangWang(){
        System.out.println(name + " 正在汪汪叫!");
    }
}
